package com.morgankelly.po;

import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType=IdentityType.APPLICATION, detachable="true")
public class Blog extends BasePO {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	@Persistent
	private String title;
	@Persistent
	private String createTime;
	@Persistent
	private String content;
	@Persistent(defaultFetchGroup = "true")
	private Key accountKey;
	@Persistent(defaultFetchGroup = "true")
	private Key categoryKey;
	
	@Persistent(defaultFetchGroup = "true")
    private List<Key> tagKeyList;
    
    private Long accountID;
    private Long categoryID;

	public Key getAccountKey() {
		return accountKey;
	}

	public void setAccountKey(Key accountKey) {
		this.accountKey = accountKey;
	}

	public Key getCategoryKey() {
		return categoryKey;
	}

	public void setCategoryKey(Key categoryKey) {
		this.categoryKey = categoryKey;
	}
	
	public Blog() {
		
	}

	public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}


	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}


	public List<Key> getTagKeyList() {
		return tagKeyList;
	}

	public void setTagKeyList(List<Key> tagKeyList) {
		this.tagKeyList = tagKeyList;
	}

	public Long getAccountID() {
		return accountID;
	}

	public void setAccountID(Long accountID) {
		this.accountID = accountID;
	}

	public Long getCategoryID() {
		return categoryID;
	}

	public void setCategoryID(Long categoryID) {
		this.categoryID = categoryID;
	}
}
